#ifndef HMIINSTANCE_H
#define HMIINSTANCE_H

#include <QObject>
#include <QWidget>
#include "_Interface/_global_datastruct.h"
#include "_Interface/_interface_hmi.h"
#include "_Interface/_interface_backend.h"

namespace Ui { class Form; }

class HmiInstance: public HmiInterface{
        Q_OBJECT
private:
    short LocalRemote;
    Ui::Form* ui;
    ENUM_WorkType mWorkType;
    ST_LaserSensorData* pLaserSensorData = nullptr;
public:
    HmiInstance(short Local_Remote);
    ~HmiInstance();
public:
    void RemoteDataRecv(QByteArray Data);
    void RemoteDataSend(QByteArray& Data);
public:
    short getBackendhandle(BackendInterface* p);
private:
    short UiDataInit();
    short UiDataUpdate();
    short LaserSensorDataScopeViewInit();
    short LaserSensorDataScopeViewUpdate();
    short SignalSlotConnect();
public slots:
    void onbtnClickedSensorConnect();
    void onbtnClickedRobotTCPConnect();
    void onbtnClickedRobotUDPConnect();
    void onbtnClickedCalibration();
    void onbtnClickedTaskNull();
    void onbtnClickedCalibrationSave();
    void onbtnClickedSeamFinding();
    void onbtnClickedSeamFindingStart2End();
    void onbtnClickedSeamTracking();
    void onbtnClickedCalPos1();
    void onbtnClickedCalPos2();
    void onbtnClickedCalPos3();
    void onbtnClickedCalPos4();
    void onbtnClickedCalPos5();
    void onbtnClickedCalPos6();
    void onbtnClickedCalibrationDo();
    void onbtnClickedCalibrationReset();
    void onbtnClickedPointRecord();
    void onbtnClickedWorkType();
    void onbtnClickedSeamPosCal();
    void onbtnClickedSeamPosReset();
    void onbtnClickedSeamPosSend();
};

#endif // HMIINSTANCE_H
